package com.ieheima.Test;


import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class testStudengt {
    public static void main(String[] args) throws Exception {
        InputStreamReader isr = new InputStreamReader(new FileInputStream("src.txt"), "GBK");
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("dest.txt"), "UTF-8");
        char [] chs = new char[1024];
        int len;
        while ((len = isr.read(chs)) != -1) {
            osw.write(chs, 0, len);
        }
        isr.close();
        osw.close();
    }
}
